package com.atom.app.lifecycle.base

import com.blankj.utilcode.util.PathUtils
import java.io.File

object AppConfig {

    val appInsideRootPath = File(PathUtils.getInternalAppDataPath()).apply {
        if (!this.exists()) {
            this.mkdirs()
        }
    }

    val appAccountRootPath = File(appInsideRootPath, "account").apply {
        if (!this.exists()) {
            this.mkdirs()
        }
    }

    val commonDataBasePath = File(appAccountRootPath, "common.db")

    fun accountDataBasePath(name: String) = File(appAccountRootPath, name).let {
        if (!it.exists()) {
            it.mkdirs()
        }
        File(it, "index.db")
    }

    val currentUser = "currentUser"

}